package com.sg.dto.integration.component;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Objects;

/**
 * @desc AdjustMainNavigationSortingDto
 * @使用场景
 */
@Data
public class AdjustMainNavigationSortingDto
        extends BaseDto
        implements Serializable {

    /**
     * 菜单编码
     */
    @ApiModelProperty("菜单编码")
    private String menuCode;

    /**
     * 菜单名称
     */
    @ApiModelProperty("菜单名称")
    private String menuName;

    /**
     * 菜单图标
     */
    @ApiModelProperty("菜单图标")
    private String menuIcon;

    /**
     * 菜单是否可见
     */
    @ApiModelProperty("菜单是否可见")
    private String menuIsVisible;

    /**
     * 菜单路径
     */
    @ApiModelProperty("菜单路径")
    private String menuPath;

    /**
     * 菜单排序
     */
    @ApiModelProperty("菜单排序")
    private String menuOrderNumber;

    /**
     * 自定义字段1
     */
    @NotNull(message = "自定义字段1不能为空")
    @ApiModelProperty("自定义字段1")
    private String customField1;

    /**
     * 自定义字段2
     */
    @NotNull(message = "自定义字段2不能为空")
    @ApiModelProperty("自定义字段2")
    private String customField2;

    /**
     * 自定义字段3
     */
    @NotNull(message = "自定义字段3不能为空")
    @ApiModelProperty("自定义字段3")
    private String customField3;

    /**
     * 自定义字段4
     */
    @NotNull(message = "自定义字段4不能为空")
    @ApiModelProperty("自定义字段4")
    private String customField4;

    /**
     * 自定义字段5
     */
    @NotNull(message = "自定义字段5不能为空")
    @ApiModelProperty("自定义字段5")
    private String customField5;

    /**
     * 自定义字段6
     */
    @NotNull(message = "自定义字段6不能为空")
    @ApiModelProperty("自定义字段6")
    private String customField6;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        AdjustMainNavigationSortingDto that = (AdjustMainNavigationSortingDto) o;
        return (
                menuCode == that.menuCode &&
                        menuName == that.menuName &&
                        menuIcon == that.menuIcon &&
                        menuIsVisible == that.menuIsVisible &&
                        menuPath == that.menuPath &&
                        menuOrderNumber == that.menuOrderNumber &&
                        customField1 == that.customField1 &&
                        customField2 == that.customField2 &&
                        customField3 == that.customField3 &&
                        customField4 == that.customField4 &&
                        customField5 == that.customField5 &&
                        customField6 == that.customField6
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                menuCode,
                menuName,
                menuIcon,
                menuIsVisible,
                menuPath,
                menuOrderNumber,
                customField1,
                customField2,
                customField3,
                customField4,
                customField5,
                customField6
        );
    }

}
